package 测试;

import java.util.Scanner;

public class day1 {    
	public static void main(String args[]){
		//九九乘法表
		System.out.println("---九九乘法表---");
		for(int i=1;i<=9;i++){
			for(int j=1;j<=i;j++){
				System.out.print(j+"*"+i+"="+(i*j)+" ");
			}
			System.out.println();
		}
		//直角三角形
		System.out.println("---直角三角形---");
		System.out.print("请输入行数:");
		Scanner read = new Scanner(System.in);
		int n = read.nextInt();
		for(int i=1;i<=n;i++){
			for(int j=1;j<=(2*i)-1;j++){
				System.out.print("*");
			}
			System.out.println();
		}
		//等腰三角形
		System.out.println("---等腰三角形---");
		System.out.print("请输入行数:");
		Scanner read_1 = new Scanner(System.in);
		int n_1 = read.nextInt();
		for(int i=1;i<=n_1;i++){
			for(int t=1;t<=n_1-i;t++){
				System.out.print(" ");
			}
			for(int j=1;j<=(2*i)-1;j++){
				System.out.print("*");
			}
			System.out.println();
		}
		//空心等腰三角形
		System.out.println("---空心等腰三角形---");
		System.out.print("请输入行数:");
		Scanner read_2 = new Scanner(System.in);
		int n_2 = read_2.nextInt();
		for(int i=1;i<=n_2;i++){
			for(int t=1;t<=n_2-i;t++){
				System.out.print(" ");
			}
			for(int j=1;j<=(2*i)-1;j++){
				if(j==1 || j==2*i-1){
					System.out.print("*");
				}else{
					System.out.print(" ");
				}
			}
			System.out.println();
		}
		//菱形
		System.out.println("---菱形---");
		System.out.print("请输入行数:");
		Scanner read_3 = new Scanner(System.in);
		int n_3 = read_2.nextInt();
		for(int i=1;i<=n_3;i++){
			for(int t=1;t<=n_3-i;t++){
				System.out.print(" ");
			}
			for(int j=1;j<=(2*i)-1;j++){
				if(j==1 || j==2*i-1){
					System.out.print("*");
				}else{
					System.out.print(" ");
				}
			}
			System.out.println();
		}
		for(int i=n_3-1;i>=1;i--){
			for(int t=1;t<=n_3-i;t++){
				System.out.print(" ");
			}
			for(int j=1;j<=(2*i)-1;j++){
				if(j==1 || j==2*i-1){
					System.out.print("*");
				}else{
					System.out.print(" ");
				}
			}
			System.out.println();
		}
		Scanner read1 = new Scanner(System.in);
		int n_4 =read.nextInt();
	}
}
